<%@ page import="psl.UserSession" %>
<%@ page import="java.sql.ResultSet" %>
<%@ page import="psl.DBConn" %>
<%@ page import="psl.RagistrationPage" %>
<%--
  Created by IntelliJ IDEA.
  User: phiteshkumar
  Date: Mar 8, 2007
  Time: 6:18:51 PM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="TagXML" prefix="Search" %>
<%
    UserSession moUserSession = (UserSession) session.getAttribute ("UserSession");
    RagistrationPage moRagistrationPage=(RagistrationPage)moUserSession.getCurrentPage ();
%>
<html>
  <head>
      <title>Registration Page</title>
      <link href='Stylesheet.css' type='text/css' rel='stylesheet'>
      <script type='text/javascript' src='ROController.js' language='JavaScript'></script>
  </head>
  <body>
  <form name='DataForm' onsubmit='return false;'>
    <input type='hidden' name='action_fld'>
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
        <tr>
            <td colspan="2">
                <%@ include file="ROCommon/Head.jsp" %>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <table width="100%">
                    <tr height="22">
                        <td bgcolor="darkseagreen" align="left"></td>
                        <td bgcolor="darkseagreen" align="center"><font color='black' size='3' style='font-weight:bold;'>Registration</font></td>
<%                      if(moUserSession.msLogin!=null)
                        {
%>
                        <td width="35" bgcolor="burlywood" align="right"><a href="javascript:performHome()"><font color='black' size='2' style=font-weight:bold;>Home</font></a></td>
<%
                        }
%>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td align="center" valign="middle" height="450">
                <table align="center" border="0"  cellpadding="0" cellspacing="4" width="55%" bgcolor="white">
                <th align="center" colspan="2">
                    Registration Form
                </th>
                <tr>
                    <td bgcolor="darksalmon" valign="top" align="left">
                        <table width="100%" class="registere">
                            <tr bgcolor="beige"><td align="center" colspan="2" height="40"><h2>Personal Detail</h2></td></tr>
                        </table>
                        &nbsp;
                        <table  border="0" class="registere" cellpadding="1" cellspacing="1">
                            <tr>
                                <td>First Name:</td>
                                <td><input type="text" name="fname" size="20" value=''></td>
                            </tr>
                            <tr>
                                <td>Middle Name:</td>
                                <td><input type="text" name="mname" size="20" value=''></td>
                            </tr>
                            <tr>
                                <td>Last Name:</td>
                                <td><input type=text name="lname" size="20" value=''></td>
                            </tr>
                            <tr>
                                <td>Phone No:</td>
                                <td><input type="text" name="phone" size="20" value=''></td>
                            </tr>
                            <tr>
                                <td >Address:</td>
                                <td><textarea rows="4" cols="19" name="address" value=''></textarea></td>
                            </tr>
                        </table>
                    </td>
                    <td valign="top" bgcolor="darksalmon" align="right">
                        <table width="100%" class="registere">
                            <tr bgcolor="beige" ><td align="center" height="40" colspan="2"><h2>Account Detail</h2></td></tr>
                        </table>
                        &nbsp;
                        <table border="0" class="registere" cellpadding="1" cellspacing="1">
                            <tr>
                                <td>Login ID:</td>
                                <td><input type="text" name="loginid" size="20" value=''></td>
                            </tr>
                            <tr>
                                <td>Password:</td>
                                <td><input type="Password" name="password" size="20" value=''></td>
                            </tr>

                            <tr>
                                <td>Confirm Password:</td>
                                <td><input type="Password" name="cpassword" size="20" value=''></td>
                            </tr>
                            <tr>
                                <td>Email Address:</td>
                                <td><input type=text name="email" size="20" value=''></td>
                            </tr>
                            <tr>
                                <td>Secret Question:</td>
                                <td>
                                    <select class="expand" name=question>
                                        <option>pets name</option>
                                        <option>favourite movie</option>
                                        <option>Childhood Hero</option>
                                        <option>First School Name</option>
                                        <option>favourite place</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>Answer:</td>
                                <td><input type=text height="100" name=answer size="20" value=''></td>
                            </tr>

                            <tr>
                                <td>City:</td>
                                <td>

                                    <select class="expand" name=city width="100%">
                                       <option value="">Select</option>
                                       <Search:ROTag ROType="City" SQLQuery="select city_name from city_web"></Search:ROTag>
                                    </select>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                    &nbsp;
                <tr valign="middle" height="60">
                    <td colspan="2" bgcolor="beige" align="center" >
<%
                    if(moRagistrationPage.mbSaveFlag){
%>
                        <button style='height:23px;width:50px;' onMouseOver="className='activeImageButton';"
                          onMouseOut="className='imageButton';" class='imageButton' disabled id='save'
                          onclick="performSave();" accesskey='S' type='button'>
                            <u>S</u>ave
                        </button>
                <%
                    }
                    else
                    {
                %>
                        <button style='height:23px;width:50px;' onMouseOver="className='activeImageButton';"
                          onMouseOut="className='imageButton';" class='imageButton' id='save'
                          onclick="performSave();" accesskey='S' type='button'>
                            <u>S</u>ave
                        </button>
                <%
                    }
                %>
                        &nbsp;
                        <button style='height:25px;width:55px;' onMouseOver="className='activeImageButton';"
                          onMouseOut="className='imageButton';" class='imageButton' id='finish'
                          onclick="performCancel();" accesskey='F' type='button'>
                            <u>F</u>inish
                        </button>
                    </td>
                </tr>
            </table>
        </td>
     </tr>
  </table>
    <%

        if(moUserSession.msConform!=null)
        {

    %>
          &nbsp;&nbsp;
          <div class='conformMessage_body' align="center">
              <table width=50% border=0 cellspacing=1 cellpadding=0>
                  <tr>
                      <td align=center><b><%=moUserSession.msConform%></b></td>
                  </tr>
              </table>
          </div>
          <%
    }
          %>

<%

    if(moUserSession.msError!=null)
    {

%>     
      <div class='message_body'>
          <table width=100% border=0 cellspacing=1 cellpadding=0>
              <tr>
                  <td width=10>
                     <img src='img/feedback-error.gif'>&nbsp;
                  </td>
                  <td><b><%=moUserSession.msError%></b></td>
              </tr>
          </table>
      </div>
      <%
}
      %>
    </form>
  </body>
</html>